At present, the interior of a lot of lighting emitting diode (LED) packages is designed to have a cavity for mounting a die, where the cavity is formed by a wiring substrate, a frame-shaped molding compound and a secondary optical element. The molding compound surrounds the die and is located between the secondary optical element and the wiring substrate. The molding compound does not touch the die, that is, there is a space between the molding compound and the die. The secondary optical element covers and adheres to the molding compound. The above-mentioned space will form a frame-shaped overlapping region between the molding compound and the secondary optical element, where the size of the overlapping region is limited. Therefore, the adhesion strength between the molding compound and the secondary optical element may be weak, resulting in a poor reliability.